﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Gmis.Public;

namespace Gmis.Web.UI
{  
    public partial class PartyOrg : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
         

        }

        //获取支部组织结构
        public string GetImage()
        {
            BLL.Branch bll = new BLL.Branch();
            List<Model.Branch> list = bll.GetModelList(" 1=1 Order By sNumber ");

            if (list == null || list.Count < 1)
            {
                return "没有数据";
            }

            int i = 0;
            string str = "<div class=\"panel1\" id=\"panel_{0}\" >";
            str += "<div class=\"inside1\">";
            str += "<img src=\"{1}\" alt=\"picture\" />";//照片
            str += "<h2>{2}</h2>";//姓名
            str += "<h2>{3}</h2>";//职务         
            str += "</div></div>";
            string resultStr = "";
            foreach (Model.Branch b in list)
            {
                i++;
                resultStr += string.Format(str, i, Gmis.Public.CommonFunction.GetPMemberPath() + b.sPicture, b.sName, b.sPosition, b.sId);
            }
            return resultStr;
        }
    }
}